# 多线程 movetothread
project(MultiThread)

# import Qt
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# 开启Qt代码自动生成，不再需用自己手写了。按顺序，分别是`Q_OBJECT`宏展开，资源文件，界面文件。
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# 使用Qt的模块
set(MEQT_LIB Core Widgets Network Concurrent SerialPort)
find_package(Qt5 COMPONENTS REQUIRED ${MEQT_LIB})

add_executable(MultiThreadDemo
    MultiThreadDemo.cpp
    MultiThreadMainDlg.cpp MultiThreadMainDlg.h MultiThreadMainDlg.ui
    MTTcpClient.cpp MTTcpClient.h
    )
qt5_use_modules(MultiThreadDemo ${MEQT_LIB})

